package com.chen.blog.mapper;

import com.chen.blog.model.Type;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chen
 * @since 2022-01-24
 */
public interface TypeMapper extends BaseMapper<Type> {

    /**
     * 检索不同分类下的博客数量
     * @return
     */
    List<Map<String, Object>> findBlogCountByType();

    /**
     * 检索指定分类下的博客
     * @param id
     * @return
     */
    List<Map<String, Object>> findBlogByTypeId(Integer id);
}
